import request from '@/utils/request.js'
import { useTokenStore } from '@/stores/token.js';

//获取订单

//1.待处理
export const getPeddingOrdersService=()=>{
    return request.get('/orders/pending')
}

//2.已处理
export const getSolvedOrdersService =()=>{
    return request.get('/orders/solved')
}

//3.全部
export const getAllOrdersService=()=>{
    return request.get('/orders')
}

//处理订单
export const delOrderService=(id)=>{
    const url = `/orders/${id}`
     return request.delete(url)
}

//发货
export const deliOrderService = (id)=>{
    const url = `/orders/${id}`
    return request.put(url)
}